package com.github.houbb.id.core;

import com.github.houbb.heaven.annotation.ThreadSafe;
import com.github.houbb.heaven.constant.PunctuationConst;
import com.github.houbb.id.api.Id;
import com.github.houbb.id.util.IdHelper;

import java.math.BigInteger;
import java.util.UUID;

/**
 * UUID 的数字形式
 *
 * @author binbin.hou
 * @since 0.0.3
 */
@ThreadSafe
public class UUIDNum implements Id {

    @Override
    public String id() {
        String uuid = IdHelper.uuid32();
        BigInteger bigInteger = new BigInteger(uuid, 16);
        return bigInteger.toString();
    }

}
